package com.ruoyi.yyq.domain.vo;

import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * 订单信息对象 car_order
 * 
 * @author ruoyi
 * @date 2025-05-12
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Document(indexName = "carorderes",shards = 3,replicas = 2)
public class CarOrderES
{

    /** 订单号 */
    @Id
    private Long id;

    /** 核销码uuid产生，唯一 */
    private String verificationCode;

    /** 核销码图片 */
    private String verificationImg;

    /** 店铺id */
    private Long mid;

    /** 用户id */
    private Long uid;

    /** 服务详情id */
    private Long serviceId;

    /** 服务类别id */
    private Long serviceTypeId;

    /** 下单时间 */
    @Field(type = FieldType.Date, format = DateFormat.custom, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSX")
    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSX", timezone = "UTC")
    private Date orderTime;

    /** 预约时间 */
    @Field(type = FieldType.Date, format = DateFormat.custom, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSX")
    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSX", timezone = "UTC")
    private Date reservationTime;

    /** 订单车辆id */
    private Long carId;

    /** 平台优惠券id */
    private Long platformCouponId;

    /** 商家优惠券id */
    private Long shopCouponId;

    /** 实付金额 */
    private BigDecimal price;

    /** 支付时间 */
    @Field(type = FieldType.Date, format = DateFormat.custom, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSX")
    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSX", timezone = "UTC")
    private Date payTime;

    /** 支付方式 */
    private Long payType;

    /** 使用时间 */
    @Field(type = FieldType.Date, format = DateFormat.custom, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSX")
    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSX", timezone = "UTC")
    private Date useTime;

    /** 订单状态（0待支付，1待使用，2待评价，3已取消，4已退款，5已完成） */
    private Long status;

    /** 删除状态 */
    private Long deleted;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("verificationCode", getVerificationCode())
            .append("verificationImg", getVerificationImg())
            .append("mid", getMid())
            .append("uid", getUid())
            .append("serviceId", getServiceId())
            .append("serviceTypeId", getServiceTypeId())
            .append("orderTime", getOrderTime())
            .append("reservationTime", getReservationTime())
            .append("carId", getCarId())
            .append("platformCouponId", getPlatformCouponId())
            .append("shopCouponId", getShopCouponId())
            .append("price", getPrice())
            .append("payTime", getPayTime())
            .append("payType", getPayType())
            .append("useTime", getUseTime())
            .append("status", getStatus())
            .append("deleted", getDeleted())
            .toString();
    }
}
